import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
import Components from "unplugin-vue-components/vite";
import path from 'path'
// https://vite.dev/config/
export default defineConfig({
  plugins: [
    vue(),
    Components({
      resolvers: [ElementPlusResolver()],
    }),
  ],
  server: {
    host: "0.0.0.0", // 监听所有地址
    port: 3333, // 指定启动端口
    open: true, // 启动后自动打开浏览器
  },
  resolve: {
    alias: {
      // 配置 '@' 别名
      '@': path.resolve(__dirname, 'src')
    }
  }
});
